#ifndef BANK_HPP
#define BANK_HPP

#include <QObject>
#include <QMap>
#include <QMapIterator>

#include "register.hpp"
#include "ioregister.hpp"

/**
* @brief
*
* @class Bank bank.hpp "bank.hpp"
*/
class Bank : public QObject
{
Q_OBJECT
public:
    /**
    * @brief Creates a new instance
    *
    * @fn Bank
    * @param parent
    */
    explicit Bank(QObject *parent = 0);

    Bank(const Bank &other);

    /**
    * @brief Returns a Register
    *
    * @fn getRegister
    * @param address
    * @return Register
    */
    Register *getRegister(int address);

    /**
    * @brief Adds a new Register for the given address
    *
    * @fn addRegister
    * @param address
    */
    void addRegister(int address, Register *reg);

    const QMap<int, Register*> &getRegisterMap() const;

    void reset();

private:
    QMap<int, Register*> registerMap;

signals:

public slots:

};

#endif // BANK_HPP
